package tgc.edu.tms.entity;

import java.util.ArrayList;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToMany;

import com.fasterxml.jackson.annotation.JsonIgnore;

import tgc.edu.tms.custom.BaseEntity;
/*
 * 选择专业表
 */
@Entity
public class Profession extends BaseEntity<Integer>{
	
	private String year;  //年级
	private String college; //学院
	private String profesion; //专业
	private String code;//专业代码
	@JsonIgnore
	private List<TbClass> tbclass=new ArrayList<>();//对应生成的班级表TbClass表
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	public String getCollege() {
		return college;
	}
	public void setCollege(String college) {
		this.college = college;
	}
	public String getProfesion() {
		return profesion;
	}
	public void setProfesion(String profesion) {
		this.profesion = profesion;
	}
	@OneToMany(mappedBy="profession",cascade=CascadeType.ALL)
	public List<TbClass> getTbclass() {
		return tbclass;
	}
	public void setTbclass(List<TbClass> tbclass) {
		this.tbclass = tbclass;
	}
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	
	
}
